package syllabus.service.impl;

import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import syllabus.dao.PFileMapper;
import syllabus.model.Criteria;
import syllabus.model.PFile;
import syllabus.service.PFileService;

@Service
public class PFileServiceImpl implements PFileService {
    @Autowired
    private PFileMapper pFileMapper;

    private static final Logger logger = LoggerFactory.getLogger(PFileServiceImpl.class);

    public int countByExample(Criteria example) {
        int count = this.pFileMapper.countByExample(example);
        logger.debug("count: {}", count);
        return count;
    }

    public PFile selectByPrimaryKey(Integer id) {
        return this.pFileMapper.selectByPrimaryKey(id);
    }

    public List<PFile> selectByExample(Criteria example) {
        return this.pFileMapper.selectByExample(example);
    }

    public int deleteByPrimaryKey(Integer id) {
        return this.pFileMapper.deleteByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(PFile record) {
        return this.pFileMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(PFile record) {
        return this.pFileMapper.updateByPrimaryKey(record);
    }

    public int deleteByExample(Criteria example) {
        return this.pFileMapper.deleteByExample(example);
    }

    public int updateByExampleSelective(PFile record, Criteria example) {
        return this.pFileMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(PFile record, Criteria example) {
        return this.pFileMapper.updateByExample(record, example);
    }

    public int insert(PFile record) {
        return this.pFileMapper.insert(record);
    }

    public int insertSelective(PFile record) {
        return this.pFileMapper.insertSelective(record);
    }

	public List<PFile> getAttachAndSyllabusName(Criteria c) {
		return this.pFileMapper.getAttachAndSyllabusName(c);
	}

	public int countBySyllabus(Criteria example) {
		return pFileMapper.countBySyllabus(example);
	}
}